import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Admin
 * Date: 2022-12-09
 * Time: 18:02
 */
public class Demo1 {
    static int[][] tmp = {{0,-1},{0,1},{-1,0},{1,0},{-1,-1},{1,1},{-1,1},{1,-1}};
    public static boolean func(char[][] array) {

        for(int i = 0; i < 20; i++) {
            for(int j = 0; j < 20; j++) {
                if(array[i][j] == '*' || array[i][j] == '+') {
                    for(int k = 0; k < 8; k++) {
                        int count = 1;
                        int x = i + tmp[k][0];
                        int y = j + tmp[k][1];
                        while(x >= 0 && x < 20 && y >= 0 && y < 20 && array[x][y] == array[i][j]) {
                            count++;
                            x += tmp[k][0];
                            y += tmp[k][1];
                        }

                        if(count == 5) return true;
                    }
                }
            }
        }
        return false;
    }

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        while(scan.hasNext()) {
            char[][] array = new char[20][20];

            for(int i = 0; i < 20; i++) {
                String str = scan.next();
                for(int j = 0; j < 20; j++) {
                    array[i][j] = str.charAt(j);
                }
            }

            System.out.println(func(array)? "Yes" : "No");
        }

    }
}
